﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="move_File.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Gallery.move_File" %>

<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<body>
    <%int id = int.Parse(Request.QueryString["id"]);
      int parent = int.Parse(Request.QueryString["parent"]);
      var get_folder = new TblLibraryController().FetchAll().Where(x => x.LibraryTrash == false && x.LibraryDelete == false && x.LibraryId != id && x.LibraryParent == parent && x.LibraryType == 0);
    %>
    <%foreach (TblLibrary folder in get_folder)
      {
          var get_sub = new TblLibraryController().FetchAll().Where(x => x.LibraryDelete == false && x.LibraryTrash == false && x.LibraryId != id && x.LibraryParent == folder.LibraryId && x.LibraryType==0);
          int count = get_sub.ToList().Count;
    %>
    <li><a ondblclick="gal_open_menu(event, 'allfolder','<%=folder.LibraryId %>')" class="gal-menu-item"><i class="w3-hide folder_id"><%=folder.LibraryId %></i><%if (count != 0)
                                                                                                                                                                  { %><i class="gal-show-folder-btn fa fa-caret-right w3-large"></i><%}
                                                                                                                                                                  else
                                                                                                                                                                  { %><i class="gal-show-folder-btn fa w3-large"></i><%} %><i class="gal-menu-icon fa fa-folder"></i><%=folder.LibraryName%></a>
        <%if (count != 0)
          {
        %>
        <ul id="folder<%=folder.LibraryId %>" class="gal-menu gal-sub-menu">
        </ul>

    </li>
    <%}
      }%>
</body>
</html>
